#include "statistic.h"
#include "mainwindow.h"
#include "ui_statistic.h"

Statistic::Statistic(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::Statistic)
{
    ui->setupUi(this);
    QString t = "%1";
    ui->label_5->setText(t.arg(MainWindow::errCount));
    ui->label->setText(t.arg(MainWindow::symCount));
    MainWindow::speed = MainWindow::symCount*60/Statistic::a;
    ui->label_3->setText(t.arg(MainWindow::speed));
}

Statistic::~Statistic()
{
    delete ui;
}

void Statistic::on_pushButton_clicked()
{
    MainWindow::errCount = 0;
    MainWindow::symCount = 0;
    this->hide();
}
